package www.xudan.android_ffmpeg.videoplayer.sample;

import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import androidx.appcompat.app.AppCompatActivity;

import www.xudan.android_ffmpeg.Constance;
import www.xudan.android_ffmpeg.R;
import www.xudan.android_ffmpeg.videoplayer.model.VideoModel;
import www.xudan.android_ffmpeg.videoplayer.widget.NoControllerPlayerView;


public class Sample4Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.player_sample_main4);
        NoControllerPlayerView playerView = findViewById(R.id.no_ui_player);
        playerView.getVideoPicImageView().setImageResource(R.drawable.pic);//设置首帧
        VideoModel videoModel = new VideoModel(Constance.path_copy_mpg, "标清");
        videoModel.autoPlay = true;//设置完播放源后是否自动播放
        playerView.setVideoModel(videoModel);
    }
}
